<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name=”keywords” content="" />
    <meta name="description" content=""/>
    <meta name="csrf-token" content="kzgwqVUm5xf1ImoRxoywAibm7Zo0MKyvtscZtPEV">
    <title>包图海外</title>
    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/jquery.flex-images.css" />
    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/bootstrap.min.css" />
    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/reset.css" />
    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/public_v1.4.css" />
    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/public.css" />
    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/iconfont.css" />
    <style>
        .prompt a {
            text-decoration:underline;
            color: rgba(255,255,255,0.85);
        }
        .prompt a:hover {
            color: #fff;
        }
    </style>

    <link rel="stylesheet" href="${ctx}/resources/css/project/web/bthw/recharge_v1.2.css">
    <@w.rctx/>
	<script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" data-appid="101515449" data-redirecturi="http://5i0z4.cn/protal/qqNotify" charset="utf-8"></script>
</head>
<body>
    <!-- 充值页头部 -->
<div class="clearfix header-info nav-search recharge">
    <a href="/" class="btos-logo">
        <i class="iconfont icon-baotuhaiwailogo"></i>
    </a>
    <div class="home-nav fr">
        
        <div class="right-item">
            <a href="javascript:;" class="contact udesk_kefu">
                <span>客服</span>
            </a>
        </div>
        <div class="right-item user-drop">
                            <div class="homedrop">
                    <a href="javascript:;" class="avatar-wrap userimgx">
                        <img src="" alt="" class="avatar">
                    </a>
                    <div class="drop-box">
                        <div class="drop-wrap" style="height: 130px;overflow: hidden;">
                            <div class="user-info">
                                <a href="javascript:;" class="avatar-wrap userimgx">
                                    <img src="" alt="" class="avatar">
                                </a>
                                <div class="name-wrap userinfox">
                                    <p class="name"></p>
                                </div>
                            </div>
                            <ul class="drop-list" style="height: 40px;">
                                <li>
                                    <a href="/">
                                    <span class="icon-wrap">
                                        <i class="iconfont icon-zhuye"></i>

                                    </span>
                                        返回主站
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                    </div>
    </div>
</div>
    <div class="container-fluid body-contains">
        <div class="clearfix body">
            <div class="header">
                <h2>加入包图·海外年企业VIP，赠包图年企业VIP</h2>
                <p><span>正版商用省心</span><span>九大分类素材皆可下载</span>版权保障省钱</p>
            </div>
            <div class="recharge-con com-recharge" id="listbox">
                <div class="cards-wrap">
                    <!--选中当前类型  添加类this-card-->
                    <a href="javascript:;" class="nav-card box" data-price="999" data-id="1">
                        <p>标准版</p>
                        <p class="price">
                            ¥<span>999</span>
                        </p>
                        <!-- <p>标准版3人使用</p> -->
                        <p>3人使用</p>
                    </a>
                    <a href="javascript:;" class="nav-card box recommend" data-price="1999" data-id="2">
                        <p>升级版</p>
                        <p class="price">
                            ¥<span>1999</span>
                        </p>
                        <!-- <p>升级版6人使用</p> -->
                        <p>6人使用</p>
                    </a>
                    <a href="javascript:;" class="nav-card box" data-price="2999" data-id="3">
                        <p>至尊版</p>
                        <p class="price">
                            ¥<span>2999</span>
                        </p>
                        <!-- <p>至尊版10人使用</p> -->
                        <p>10人使用</p>
                    </a>
                </div>

                <div class="payfor-box">
                    <p id="type-amount">应付金额：<span>1999</span>元 </p>
                    <div class="payfor-way way-wx" style="cursor: pointer;">
                        <dt id="wxqr" class="pay_weixin_qrcode">
                        </dt>
                        <figcaption> <i class="icon-go"></i> 微信支付</figcaption>
                    </div>
                    <div class="payfor-way way-zfb">
                        <dt id="zfbqr" class="pay_weixin_qrcode">
                        </dt>
                        <figcaption>支付宝支付</figcaption>
                    </div>
                </div>
                <div class="agree-rule">
                    <input type="checkbox" checked="checked" name="vehicle" value="1" id="agree">
                    <span>支付即同意</span>
                    <span class="vip-rule" style="cursor:pointer">《包图网会员-用户协议》</span>
                </div>

                <style>
    /*支付协议弹窗*/
    .pay-pop {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1210;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, .6);
    }

    .pay-pop > div {
        position: absolute;
        overflow: hidden;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        margin: auto;
        -webkit-border-radius: 8px;
        border-radius: 8px;
        -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .3);
        box-shadow: 0 0 10px rgba(0, 0, 0, .3);
    }

    .pay-pop .pop-vipRule {
        width: 500px;
        height: 750px;
        background: #fff;
        -webkit-border-radius: 0;
        border-radius: 0;
        overflow: visible;
        font-size: 14px;
        line-height: 24px;
        color: #666;
    }

    .pay-pop .pop-vipRule .pop-close {
        position: absolute;
        top: -33px;
        right: -42px;
        padding: 5px;
        background: rgba(0, 0, 0, .5);
        -webkit-border-radius: 50%;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        font-size: 30px;
        text-align: center;
        line-height: 25px;
        color: #ffffff;
        text-decoration: none;
    }

    .pay-pop .pop-vipRule > article {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 1;
        width: 500px;
        height: 750px;
        padding: 15px 30px;
        overflow: auto;
        box-sizing: border-box;
    }

    .pay-pop .pop-vipRule h2, .pop-vipRule h4 {
        color: #333;
    }

    .pay-pop .pop-vipRule h2 {
        line-height: 36px;
        font-size: 18px;
        text-align: center;
    }

    .pay-pop .pop-vipRule > article > p {
        text-indent: 2em;
    }
</style>

<div class="pay-pop" style="display: none;">
    <div class="pop-vipRule">
        <a href="javascript:;" class="pop-close" onclick="$('.pay-pop').hide();">×</a>
        <article><h2>VIP会员服务协议</h2>
            <p>
                欢迎使用上海包图网络科技有限公司（以下简称“包图”）的VIP会员服务，为了保障您的权益，请在进行下一步操作前，详细阅读本协议的所有内容，特别是加粗部分。当您勾选”同意《VIP会员服务协议“或“立即开通”按钮或其他具有类似含义的按钮时，您的行为表示您同意并签署了本协议，并同意遵守本协议中的约定。该协议构成您与包图达成的协议，具有法律效力。</p>
            <p>
                本协议是《包图网网络服务使用协议》的补充协议，是其不可分割的组成部分，与其构成统一整体。本协议与《包图网网络服务使用协议》存在冲突的，以本协议为准。本协议内容包括本协议正文、包图已经发布和/或将来可能发布的与包图VIP会员服务相关的各类规则。所有规则为本协议不可分割的组成部分，与本协议具有同等法律效力。一旦相关内容发生变动，包图将会通过电子邮件或网站公告等方式提示您。如果您不同意对本协议内容所做的修改，则应立即停止使用本服务；如果您继续使用本服务的，则视为您同意对本协议内容所做的修改。</p>
            <section><h4>一. 定义</h4>
                <p>1.包图VIP会员：指注册用户在签署本协议并根据包图公布的收费标准支付相应的费用后获取的特殊资格，具体资格名称以包图公示的名称为准。以下简称“会员”。</p>
                <p>2.会员服务：指会员所享有根据选择购买的会员选项所享有的特殊服务，具体以包图公布的服务内容为准。</p>
                <p>3.包图网：指 http://5i0z4.cn，主要分为海外精选素材、原创素材及其他素材，由上海包图网络科技有限公司所有及运营。</p>
                <p>4.包图海外网：指http://5i0z4.cn，主要以海外素材为主，由上海包图网络科技有限公司所有及运营。</p></section>
            <section><h4>二. 使用规范</h4>
                <p>
                    1.您申请开通会员服务时，需要提交您本人的手机号码、邮箱及第三方支付账户等个人资料或企业身份证明资料，并保证您提供的个人资料真实、准确、完整、合法有效，如有变动，您应及时更新。如您提供的资料不合法、不真实、不准确、不详尽，由此引起的损失及法律责任将由您自行承担，给包图造成损失的，包图保留要求您赔偿的权利。</p>
                <p>
                    2.包图有权单方对其提供的虚拟产品(包括但不限于VIP会员)予以定价，并有权根据自身运营需要予以变更，且包图在此获得您的授权可以根据平台统一调整比例调整您已经获取的虚拟产品; 基于虚拟产品的性质和特征，您所获取的虚拟产品不能够进行退货、换货、兑换现金亦不得用于商业领域如买卖、置换、抵押等。一切通过非官方公布渠道取得的虚拟产品及其衍生服务均不获保护，包图有权中止或终止对您的服务。</p>
                <p>3.会员服务有效期根据您选择购买的会员选项的具体时长为准，自您成功支付会员服务费用之日起计算。每一个收费项目的服务周期以页面标注期限为准。如您未在有效时间内使用已购买的服务，视为您已使用，包图概不退款。<br>若您希望在有效期届满后继续享受会员服务，则需要重新购买。
                </p>
                <p>
                    4.若您购买了多个收费服务，其服务范围相同且有效期发生重合的情况下，高等级套餐会自动覆盖低等级套餐，同时您已支付的低等级套餐费用包图概不退款。例如您在5月1日购买广告设计39元套餐（1年可下载10个/天），5月7日购买广告设计99元套餐（一年内海量下载），99元套餐将自动覆盖39元套餐。</p>
                <p>
                    5.在使用会员服务过程中，您应当是具备与您行为相适应的民事行为能力的自然人、法人或其他组织。若您不具备前述主体资格，请务必在您的监护人的帮助下共同完成，若因此使得包图或任何第三方权益受损，您及您的监护人将承担相应的责任。</p>
                <p>6.您知悉并同意，包图有权通过邮件、短信或电话等形式， 向您发送会员活动相关信息。</p>
                <p>
                    7.您确认会员服务仅限您本人使用，同时，您保证您将合理使用会员服务，不利用会员服务非法获利，不以任何形式转让您所享有的会员服务，不以任何形式将您所享有的会员服务借给他人使用，如包图有合理理由怀疑您存在不当使用会员服务时，包图有权取消您的会员资格且不退还您支付的会员服务费用，因此产生的相关责任及损失均由您自行承担，给包图造成损失的，包图保留向您追偿的权利。</p>
                <p>8.包图网保留在法律法规允许的范围内自行决定是否接受您的会员申请、调整会员服务内容、取消会员资格等相关权利。</p>
                <div>
                    9.您理解并保证，您在使用会员服务过程中遵守诚实信用原则。如包图发现或有合理理甶怀疑您存在以下任一情形的：
                    <ul>
                        <li>(a) 通过任何不当手段或以违反诚实信用原则的方式开通会员服务的，包括但不限于通过恶意软件绕过包图设定的正常流程开通会员服务；</li>
                        <li>(b) 您提供的资料不合法、不真实，包括但不限于盗用他人信息；</li>
                        <li>(c) 您通过包图会员专区购买的商品用于法律法规所禁止的目的的；</li>
                        <li>(d) 包图有合理理由怀疑您存在违反诚实信用原则的其他行为。 则包图有权拒绝您的会员服务开通需求；若已开通的，包图有权单方面取消您的会员资格且不退还您支付的会员服务费用。</li>
                    </ul>
                </div>
                <p style="font-weight: bold;">10.您理解并同意包图有权根据实际业务需要不时地调整其网站内容而无需另行通知您，包括但不限于内容增减、授权期限、收费模式等等。</p>
            </section>
            <section><h4>三. 账号独立</h4>
                <p>1.同一主体拥有的QQ帐号及微信帐号，在进行包图VIP登录时，将被识别为两个独立的帐号；</p>
                <p>2.同一主体拥有多个QQ帐号并进行包图VIP会员登录的，每一个QQ帐号将被识别为一个独立的帐号；</p>
                <p>3.同一主体拥有多个微信帐号并进行包图VIP会员登录的，每一个微信帐号将被识别为一个独立的帐号；</p>
                <p>
                    4.每个帐号之间的充值记录、VIP权限无法进行转移、迁徙、转让、赠与、售卖、租借、分享，无论该等帐号是否由同一使用人拥有，请您在登录/充值/参加活动时注意区分，避免造成损失。由此造成的损失由VIP会员自行承担。</p>
                <p>5.包图网会员账号和包图海外网会员账号为独立账号。因包图网会员与包图海外网会员的价格及下载权限不同，故不能混合使用，但包图另有规定除外。</p></section>
            <section><h4>四. 会员服务售后</h4>
                <p>1.您知悉并确认，开通会员服务后，若您中途主动取消服务或终止资格或被包图根据《包图网网络服务使用协议》、本协议及相关规则注销账号、终止会员资格的，您已支付的会员服务费用将不予退还。</p>
                <p>2.如您有其他与会员服务售后相关的问题，可以通过包图公布的联系方式联系客服进行反馈。</p></section>
            <section><h4>五. 其他约定</h4>
                <p>1.通知：所有发给您的通知都可通过电子邮件、常规的信件或在网站显著位置公告的方式进行传送。</p>
                <p>2.包图海外网的会员需要遵守包图的《最终用户许可协议》。</p>
                <p>3.本协议适用中华人民共和国的法律。当本协议的任何内容与中华人民共和国法律相抵触时，应当以法律规定为准，同时相关条款将按法律规定进行修改或重新解释，而本协议其他部分的法律效力不变。</p>
                <p>4.如使用会员服务过程中出现纠纷，您与包网应友好协商解决，若协商不成，应约定相关诉讼由上海市浦东新区人民法院管辖。</p></section>
        </article>
    </div>
</div>            </div>
        </div>
    </div>

    <!--底部-->
<footer>
    <div class="main-w">
        <a href="http://5i0z4.cn" class="btos-logo">
            <i class="iconfont icon-baotuhaiwailogo"></i>
        </a>
        <div class="fr about-links">
            <a href="http://5i0z4.cn">关于包图海外</a>
            <a href="http://5i0z4.cn">包图主站</a>
            <span>包图网-Copyright ©2018 包图网 </span>
        </div>
    </div>
</footer>

<style>
    .mobile-new-lore .slide-veri-box{
        background: none;
    }
    .nc_scale{
        height: 38px;
    }
    .nc-container .nc_scale span{
        height: 38px;
        line-height: 38px;
    }
    .nc-container .nc_scale .scale_text{
        line-height: 38px;
    }

    .login-pop .protocol-link{
        font-size: 12px;
        color: #ccc;
        display: block;
        text-align: center;
        margin-top: 32px;
    }

    .login-pop .protocol-link>a{
        color: #ccc;
    }

</style>

<!-- 弹框 -->
<div class="btos-popbox login-father-level" style="display:none;">
    <div class="mask"></div>
    <!-- 选择登录方式 -->
    <div class="pop-contains login-pop" id="login_ways" style="display: none;">
        <a href="javascript:;" class="closebtn" onclick="$(this).parent().parent().hide();"><i class="icon-close"></i></a>
        <div class="content">
            <i class="icon-logo"></i>
            <p class="ways">请选择登录方式</p>
            <div class="list">
                <a href="javascript:;" class="waysqq login-qq-i"><span><i></i></span> QQ登录</a>
            </div>
            <div class="protocol-link">注册即同意<a href="//ibaotu.com/?m=aboutus&amp;a=announce">《包图网络服务使用协议》</a>&amp;<a href="//ibaotu.com/?m=aboutus&amp;a=privacy">《包图隐私政策》</a></div>
        </div>
    </div>
    <!-- if 手机登录 -->
    <div class="pop-contains login-pop s_login_c" id="login_phone" style="display: none;">
        <a href="javascript:;" class="closebtn" onclick="$(this).parent().parent().hide();"><i class="icon-close"></i></a>
        <div class="content">
            <i class="icon-logo"></i>
            <ul class="ph-info">
                <li class="cell">
                    <i class="cell-txt"></i>
                    <input type="text" class="login_phone_input" maxlength="11" placeholder="请输入手机号">
                    <b class="login_Text">亲，您的手机号码不对哟</b>
                </li>
                <li class="yzm">
                    <div class="slider-yzm" id="login-slide-div"></div>

                    <input type='hidden' id='login-slide-div-sig' name='sig' />
                    <input type='hidden' id='login-slide-div-token' name='token' />
                    <input type='hidden' id='login-slide-div-scene' name='scene' />
                    <input type='hidden' id='login-slide-div-csessionid' name='csessionid' />
                </li>
                <li class="password">
                    <i></i>
                    <input type="text" id="mo-veri" class="login_code_input" maxlength="6" placeholder="请输入验证码">
                    <a href="javascript:;" class="words ver-btn" style="color: #ff9100">发送验证码</a>
                    <b class="login_Text ">亲，请输入正确的验证码哟</b>
                </li>
            </ul>
            <a href="javascript:;" class="loginbtn mob-login-sub">登录</a>
            <p class="other-way" onclick="$('#login_ways').show();$('#login_phone').hide()">使用第三方账号登录  <a href="javascript:;"><i  class="icon-wx"></i></a><a href="javascript:;"><i class="icon-qq"></i></a></p>
        </div>
    </div>

    <!-- if 手机号绑定QQ或者微信 -->
    <div class="pop-contains login-pop bd_login_x" id="binding_phone" style="display: none">
        <a href="javascript:;" class="closebtn" onclick="$(this).parent().parent().hide();"><i class="icon-close"></i></a>
        <div class="content">
            <i class="icon-logo"></i>
            <p class="ways">请选择登录账号</p>
            <div class="binding">
                <p>
                    亲，为了您的账号安全，您的手机号只能绑定一个包图账号。<br> 请选择绑定：
                </p>
                <div class="bindwhich">
                    <a href="javascript:;" class="account-bind-info-0 choice-binding-phone" data-id=""><img src="" alt=""><span>QQ名字</span> <b>609966363</b></a>
                    <a href="javascript:;" class="account-bind-info-1 choice-binding-phone" data-id=""><img src="" alt=""><span>微信名字</span><b>609966363</b></a>
                </div>

                <a href="javascript:;" class="fr useqq" onclick="$('#login_ways').show();$('#binding_phone').hide()">使用QQ/微信注册</a>
            </div>
        </div>
    </div>
</div><!-- 绑定手机号弹框 -->
<div class="btos-popbox phone_bind_pop" style="display: none;">
    <div class="mask"></div>
    <div class="pop-contains bund-pop" id="bund_ph">
        <a href="javascript:;" class="closebtn" onclick="$(this).parent().parent().hide();"><i class="icon-close"></i></a>
        <div class="content">
            <p class="tit">绑定手机号 <br> <span class="tip active">你离好素材只剩一步啦，绑定手机号继续下载吧</span></p> <!-- 显示此提示添加active类名 -->
            <div class="clearfix input-box">

                <input type="text" class="phnum bind_phone_input" maxlength="11" placeholder="请输入手机号" />
                <p class="text bind_phone_p">请输入正确的手机号</p> <!-- 显示此提示添加active类名 -->

                <div class="slider-YZM" id="bind-slide-div"></div>

                <input type='hidden' id='bind-slide-div-sig' name='sig' />
                <input type='hidden' id='bind-slide-div-token' name='token' />
                <input type='hidden' id='bind-slide-div-scene' name='scene' />
                <input type='hidden' id='bind-slide-div-csessionid' name='csessionid' />

                <input type="text" class="idencode bind_code_input" maxlength="6" placeholder="请输入验证码" />
                <a href="javascript:;" class="send-btn active bind_code">发送验证码</a> <!-- 可发送验证码状态添加active类名 -->
                <p class="text bind_code_p">验证码不正确</p> <!-- 显示此提示添加active类名 -->

            </div>
            <a href="javascript:;" class="submit mobile_bind_sub">确认</a> <!-- 可点击添加active类名 -->
        </div>
    </div>
</div>
<!--  宣传视频弹框  -->
<div class="btos-popbox" id="introduceVideo" style="display:none;">
    <div class="mask"></div>
    <div class="pop-contains introduce-pop">
        <a href="javascript:;" class="closebtn" onclick="$('#introduceVideo').hide().find('video').get(0).pause();"><i class="icon-close"></i></a>
        <video src="" data-src="//js.ibaotu.com/son/images/video/btos-introduce.mp4" controls class="111"></video>
    </div>
</div>
<script src="${ctx}/resources/js/project/web/bthw/jquery.js"></script>
<script src="${ctx}/resources/js/project/web/bthw/js.cookie-2.2.0.js"></script>
<script src="${ctx}/resources/js/project/web/bthw/lodash-4.17.11.min.js"></script>
<script src="${ctx}/resources/js/project/web/bthw/TweenMax.min.js"></script>
<script src="${ctx}/resources/js/project/web/bthw/public_v1.2.js?v=123"></script>
<script src="${ctx}/resources/js/project/web/bthw/bootstrap.min.js"></script>
<script src="${ctx}/resources/js/project/web/bthw/jquery.flex-images.min.js"></script>
<script src="${ctx}/resources/js/project/web/bthw/phoneLoginNew.js?v=124"></script>
<script src="${ctx}/resources/js/project/web/bthw/iconfont.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctx}/resources/js/project/web/bthw/nc.js?t=2015052012"></script>


<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b4218c7165fc08099d62aed9131b7214";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

<script>
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });

    var _showSemLogin = '';
    var _isHome = '';

    function _isLogin() {
       return '1';
    }

    /**
     * 显示登录弹窗
     */
    function _showLogin() {
        showCaptcha('login-slide-div',300);
        $(".login-father-level").css('display','block');
        $("#login_ways").css('display','block');
    }

    var _popConfig = {
        404: {
            content: '素材可能被外星人带走了',
            button: {
                text: '告诉我们',
                url: 'https://haiwai.ibaotu.com/about/index?active=3#about_opinion'
            }
        },
        4041: {
            content: '尊敬的用户，本站素材普通用户可免费下载1个/天。<br/>开通包图·海外个人VIP可享本站素材海量下载',
            button: {
                text: '加入个人VIP',
                url: 'https://haiwai.ibaotu.com/payment'
            }
        },
        4042: {
            content: '系统显示您今日操作频繁，为了您的账户安全，请稍后再试',
            button: {
                text: '知道了',
                url: ''
            }
        },
        4043: {
            content: '系统显示您今日操作频繁，为了您的账户安全，请稍后再试',
            button: {
                text: '知道了',
                url: ''
            }
        },
        4044: {
            content: '尊敬的企业用户，系统显示您今日操作频繁，为了您的账户安全，请稍后再试',
            button: {
                text: '知道了',
                url: ''
            }
        },
        4045: {
            content: '尊敬的用户， 开通包图·海外个人VIP，立享本站高清素材海量下载',
            button: {
                text: '加入个人VIP',
                url: 'https://haiwai.ibaotu.com/payment'
            }
        },
        4046: {
            content: '尊敬的客官大大，下载次数已经达到上限啦！升级VIP，海量下载一步到位！',
            button: {
                text: '立即升级',
                url: 'https://haiwai.ibaotu.com/payment?vid=3'
            }
        },
        4047: {
            content: '尊敬的用户，开通包图·海外个人VIP，立享全球正版精选素材海量下载',
            button: {
                text: '加入个人VIP',
                url: 'https://haiwai.ibaotu.com/payment'
            }
        }
    };

    function _showPop(code) {
        var config = _popConfig[code];

        console.log(config);

        if (config) {
            var tpl = '<div class="btos-popbox dl-limit">'
                + '<div class="mask"></div>'
                + '<div class="pop-contains limit-pop">'
                + '<a href="javascript:;" class="closebtn"><i class="icon-close"></i></a>'
                + '<div class="content">'
                + '<i class="icon-limitbg"></i>'
                + '<p class="p-text"></p>'
                + '<a href="" class="knowbtn p-btn"></a>'
                + '</div>'
                + '</div>'
                + '</div>';

            var $tpl = $(tpl);
            $tpl.find('.p-text').html(config['content']);
            $tpl.find('.p-btn').text(config['button']['text']);

            if (config['button']['url']) {
                $tpl.find('.p-btn').attr('href', config['button']['url']);
            } else {
                $tpl.find('.p-btn').attr('href', 'javascript:;');
            }

            $tpl.find('.closebtn, .p-btn').click(function () {
                $(this).parents('.dl-limit').hide();
                $(this).parents('.dl-limit').remove();
            });

            $('body').append($tpl);
            $tpl.show();
        }
    }

    /**
     * 处理下载
     * @param  id
     * @param  type
     * @param  format
     */
    function _handleDownload(id, type, format) {

        if (!_isLogin()) {
            _showLogin();
        }

        var dlUrl;

        if (type == 'photo') {
            dlUrl = '/photos/'+id+'/download';
        } else if (type == 'video') {
            dlUrl = '/videos/'+id+'/download';
        } else if (type == 'audio') {
            dlUrl = '/audio/'+id+'/download';
        }

        if (format) {
            dlUrl = dlUrl +'?format='+format;
        }

        $.get(dlUrl, function (res) {
            if (res.status == 200) {
                location.href = res.url;
            } else if (res.status == 401) {
                _showLogin();
            } else if (res.status == 4011) {
                showCaptcha('bind-slide-div',300);
                $(".phone_bind_pop").show();
            } else {
                _showPop(res.status);
            }
        });
    }

    function _handleStar(type, id, success, error) {
        if (!_isLogin()) {
           return _showLogin();
        }
        var urls = {
            'photo': 'https://haiwai.ibaotu.com/images/star',
            'video': 'https://haiwai.ibaotu.com/videos/star',
            'audio': 'https://haiwai.ibaotu.com/audio/star'
        };

        $.post(urls[type], {'id': id}, function (res) {
            res.status == 200 ? success() : error();
        })
    }

    function _handleUnstar(type, id, success, error) {
        if (!_isLogin()) {
            return _showLogin();
        }

        var urls = {
            'photo': 'https://haiwai.ibaotu.com/images/unstar',
            'video': 'https://haiwai.ibaotu.com/videos/unstar',
            'audio': 'https://haiwai.ibaotu.com/audio/unstar'
        };

        $.post(urls[type], {'id': id}, function (res) {
            res.status == 200 ? success() : error();
        })
    }

    function _isWaterfallMode() {
        return Cookies.get('_ss_search_list_mode') === 'waterfall';
    }

    function _setSearchListMode(mode)
    {
        Cookies.set('_ss_search_list_mode', mode , { expires: 15});
    }

    var event_stats_url = 'https://haiwai.ibaotu.com/stats/event';
    // 页面事件统计
    function _event(event) {
        $.post(event_stats_url, event)
    }


    $(function () {
        // 下拉搜索
        var $dropdown = $('.classify-drop-wrap');
        $('.classify-drop-list li').on('click', function () {
            var $this = $(this);
            handelSearch($this.data('resource'), $this.parents('.btos-search').find('.searchInput').val());
            // var label = $this.data('label');
            // $dropdown.find('.selected-label').text(label);
            // $dropdown.find('ul').data('resource', $this.data('resource'));
            // $('.searchInput').attr('placeholder', $this.data('holder'));
        });

        var classDropListWrap = $('.btos-search .drop-list-wrap');
        $('.btos-search .classify-drop').hover(function () {
            classDropListWrap.addClass('active');
        },function (){
            classDropListWrap.removeClass('active');
        });
        classDropListWrap.hover(function () {
            classDropListWrap.addClass('active');
        },function (){
            classDropListWrap.removeClass('active');
        });
        $('.classify-drop-list>li').click(function (){
            classDropListWrap.removeClass('active');
        });

        var urls = {
            'photo': 'https://haiwai.ibaotu.com/photos',
            'chahua': 'https://haiwai.ibaotu.com/chahua',
            'vector': 'https://haiwai.ibaotu.com/vector',
            'video': 'https://haiwai.ibaotu.com/videos',
            'audio': 'https://haiwai.ibaotu.com/audio',
            'searchUrl': 'https://haiwai.ibaotu.com/search/getUrl'
        };

        var _history = {"photo":[],"chahua":[],"video":[],"vector":[],"audio":[]};

        // 搜索框
        $('.search-btn').on('click', function () {
            var resource = $dropdown.find('ul').data('resource');
            var val = $(this).parent('.search-drop').find('.searchInput').val();
            handelSearch(resource, val);
        });

        // 搜索回车
        $('.searchInput').on('keypress', function (e) {
            if(e.keyCode == 13) {
                var resource = $dropdown.find('ul').data('resource');
                var val = $(this).parent('.search-drop').find('.searchInput').val();
                handelSearch(resource, val);
            }
        });

        function handelSearch(resource, val) {
            var statsUrl = 'https://haiwai.ibaotu.com/stats/search';
            var data = {'q': val, 'resource': resource};

            if (val.length < 1) {
                location.href = urls[resource];
            } else {
                // 统计
                $.post(statsUrl, data, function () {});
                $.get(urls.searchUrl, data, function (res) {
                    if (res.status == 200) {
                        location.href = res.url;
                    }
                });
            }
        }

        // 输入框聚焦加载搜索历史
        $('.searchInput').on('focus', function () {
            var resource = $dropdown.find('ul').data('resource');
            hotKwOptions.currentPage = 0;

            renderHistory(resource);
        });

        function renderHistory(resource)
        {
            var data;
            var $list = $('.sHistory');
            if (data = _history[resource]) {
                $list.empty();
                data.forEach(function (item) {
                    var $a = $('<a href="javascript:;"  data-val="'+item['keyword']+'" data-url="'+item['url']+'">'+item['keyword']+'</a>');
                    $list.append($a);
                })
            } else {
                $list.empty();
            }
        }

        // 历史搜索词点击处理
        $('.sHistory').on('click', 'a', function (e) {
            e.preventDefault();

            var statsUrl = '/stats/search';
            var resource = $dropdown.find('ul').data('resource');
            var type = $dropdown.find('ul').data('type');

            var data = {'q': $(this).data('val'), 'type': type, 'resource': resource};

            $.post(statsUrl, data, function () {});
            location.href= $(this).data('url');
        });

        // 清空搜索历史
        $('.clearHistory').on('click', function (e) {
            e.stopPropagation();
            var resource = $dropdown.find('ul').data('resource');
            $.post('/user/search/history', {'_method': 'delete', resource: resource}, function (res) {});

            $('.sHistory').empty();
        });

        // 热门搜索
        var hotKwOptions = {
            'currentPage': 0,
        };

        var _hotKws = {"photo":[{"keyword":"\u57ce\u5e02","url":"https:\/\/haiwai.ibaotu.com\/photos\/chengshi_7364"},{"keyword":"\u5efa\u7b51","url":"https:\/\/haiwai.ibaotu.com\/photos\/jianzhu_26599"},{"keyword":"\u529e\u516c","url":"https:\/\/haiwai.ibaotu.com\/photos\/bangong_2764"},{"keyword":"\u6625\u5929","url":"https:\/\/haiwai.ibaotu.com\/photos\/chuntian"},{"keyword":"\u96e8","url":"https:\/\/haiwai.ibaotu.com\/photos\/yu_66351"},{"keyword":"\u6c34\u58a8","url":"https:\/\/haiwai.ibaotu.com\/photos\/shuimo"},{"keyword":"\u7bee\u7403","url":"https:\/\/haiwai.ibaotu.com\/photos\/lanqiu_32592"},{"keyword":"\u4eba","url":"https:\/\/haiwai.ibaotu.com\/photos\/ren_44167"},{"keyword":"\u526a\u7eb8","url":"https:\/\/haiwai.ibaotu.com\/photos\/jianzhi_26331"},{"keyword":"\u70df\u82b1","url":"https:\/\/haiwai.ibaotu.com\/photos\/yanhua_62470"},{"keyword":"\u80cc\u666f","url":"https:\/\/haiwai.ibaotu.com\/photos\/beijing_3908"},{"keyword":"\u5956\u676f","url":"https:\/\/haiwai.ibaotu.com\/photos\/jiangbei"},{"keyword":"\u7bee\u7403","url":"https:\/\/haiwai.ibaotu.com\/photos\/lanqiu_32592"},{"keyword":"\u5c71\u6c34","url":"https:\/\/haiwai.ibaotu.com\/photos\/shanshui"},{"keyword":"\u5efa\u7b51","url":"https:\/\/haiwai.ibaotu.com\/photos\/jianzhu_26599"},{"keyword":"\u533b\u9662","url":"https:\/\/haiwai.ibaotu.com\/photos\/yiyuan"},{"keyword":"NBA","url":"https:\/\/haiwai.ibaotu.com\/photos\/NBA"},{"keyword":"\u732b","url":"https:\/\/haiwai.ibaotu.com\/photos\/mao_35660"},{"keyword":"\u8774\u8776","url":"https:\/\/haiwai.ibaotu.com\/photos\/hudie"},{"keyword":"\u706b\u8f66","url":"https:\/\/haiwai.ibaotu.com\/photos\/huoche_24440"},{"keyword":"\u6c7d\u8f66","url":"https:\/\/haiwai.ibaotu.com\/photos\/qiche_42057"},{"keyword":"\u4f1a\u8bae","url":"https:\/\/haiwai.ibaotu.com\/photos\/huiyi_24090"},{"keyword":"\u62db\u8058","url":"https:\/\/haiwai.ibaotu.com\/photos\/zhaopin"},{"keyword":"\u7269\u6d41","url":"https:\/\/haiwai.ibaotu.com\/photos\/wuliu"},{"keyword":"\u8863\u670d","url":"https:\/\/haiwai.ibaotu.com\/photos\/yifu"},{"keyword":"\u80fd\u6e90","url":"https:\/\/haiwai.ibaotu.com\/photos\/nengyuan"},{"keyword":"\u7535\u8111","url":"https:\/\/haiwai.ibaotu.com\/photos\/diannao_11636"},{"keyword":"\u5c0f\u6e05\u65b0","url":"https:\/\/haiwai.ibaotu.com\/photos\/xiaoqingxin"},{"keyword":"\u6e29\u6696","url":"https:\/\/haiwai.ibaotu.com\/photos\/wennuan"},{"keyword":"\u53a8\u623f","url":"https:\/\/haiwai.ibaotu.com\/photos\/chufang_8255"},{"keyword":"\u5bb6\u5c45","url":"https:\/\/haiwai.ibaotu.com\/photos\/jiaju_25542"},{"keyword":"\u684c\u9762","url":"https:\/\/haiwai.ibaotu.com\/photos\/zhuomian"},{"keyword":"\u84dd\u8272\u80cc\u666f","url":"https:\/\/haiwai.ibaotu.com\/photos\/lansebeijing_32249"},{"keyword":"\u767b\u5c71","url":"https:\/\/haiwai.ibaotu.com\/photos\/dengshan"},{"keyword":"\u6c34","url":"https:\/\/haiwai.ibaotu.com\/photos\/shui_51582"},{"keyword":"\u5ba2\u670d","url":"https:\/\/haiwai.ibaotu.com\/photos\/kefu_31219"}],"chahua":[{"keyword":"\u8bbe\u8ba1","url":"https:\/\/haiwai.ibaotu.com\/chahua\/sheji_47355"},{"keyword":"\u5143\u7d20","url":"https:\/\/haiwai.ibaotu.com\/chahua\/yuansu_66634"},{"keyword":"\u96ea\u82b1","url":"https:\/\/haiwai.ibaotu.com\/chahua\/xuehua"},{"keyword":"\u5fc3","url":"https:\/\/haiwai.ibaotu.com\/chahua\/xin_60481"},{"keyword":"\u5730\u7403","url":"https:\/\/haiwai.ibaotu.com\/chahua\/diqiu"},{"keyword":"\u661f\u661f","url":"https:\/\/haiwai.ibaotu.com\/chahua\/xingxing_61167"},{"keyword":"\u592a\u9633","url":"https:\/\/haiwai.ibaotu.com\/chahua\/taiyang_53171"},{"keyword":"\u6708\u4eae","url":"https:\/\/haiwai.ibaotu.com\/chahua\/yueliang"},{"keyword":"\u8774\u8776","url":"https:\/\/haiwai.ibaotu.com\/chahua\/hudie"},{"keyword":"\u94b1","url":"https:\/\/haiwai.ibaotu.com\/chahua\/qian_42543"},{"keyword":"\u5b66\u751f","url":"https:\/\/haiwai.ibaotu.com\/chahua\/xuesheng_61771"},{"keyword":"\u79d1\u6280","url":"https:\/\/haiwai.ibaotu.com\/chahua\/keji_30573"},{"keyword":"\u8d2d\u7269","url":"https:\/\/haiwai.ibaotu.com\/chahua\/gouwu_17839"},{"keyword":"\u7535\u8111","url":"https:\/\/haiwai.ibaotu.com\/chahua\/diannao_11636"},{"keyword":"\u8336","url":"https:\/\/haiwai.ibaotu.com\/chahua\/cha_6248"},{"keyword":"\u6c34","url":"https:\/\/haiwai.ibaotu.com\/chahua\/shui_51582"},{"keyword":"\u4e92\u8054\u7f51","url":"https:\/\/haiwai.ibaotu.com\/chahua\/hulianwang_22462"},{"keyword":"\u97f3\u4e50","url":"https:\/\/haiwai.ibaotu.com\/chahua\/yinyue"},{"keyword":"\u5956\u676f","url":"https:\/\/haiwai.ibaotu.com\/chahua\/jiangbei"},{"keyword":"\u6c14\u7403","url":"https:\/\/haiwai.ibaotu.com\/chahua\/qiqiu_42026"},{"keyword":"\u53a8\u623f","url":"https:\/\/haiwai.ibaotu.com\/chahua\/chufang_8255"},{"keyword":"\u6cb9\u753b","url":"https:\/\/haiwai.ibaotu.com\/chahua\/youhua_65784"},{"keyword":"\u7ea2\u8272\u80cc\u666f","url":"https:\/\/haiwai.ibaotu.com\/chahua\/hongsebeijing_21936"},{"keyword":"\u6d77\u62a5","url":"https:\/\/haiwai.ibaotu.com\/chahua\/haibao_19684"},{"keyword":"\u80cc\u666f\u677f","url":"https:\/\/haiwai.ibaotu.com\/chahua\/beijingban_3918"},{"keyword":"\u661f\u7a7a","url":"https:\/\/haiwai.ibaotu.com\/chahua\/xingkong_61083"},{"keyword":"\u5a5a\u793c","url":"https:\/\/haiwai.ibaotu.com\/chahua\/hunli_24207"},{"keyword":"\u51e0\u4f55","url":"https:\/\/haiwai.ibaotu.com\/chahua\/jihe_25194"},{"keyword":"\u6625\u5929","url":"https:\/\/haiwai.ibaotu.com\/chahua\/chuntian"},{"keyword":"\u63d2\u56fe","url":"https:\/\/haiwai.ibaotu.com\/chahua\/chatu"},{"keyword":"\u82b1\u7eb9","url":"https:\/\/haiwai.ibaotu.com\/chahua\/huawen_23072"},{"keyword":"\u821e\u53f0","url":"https:\/\/haiwai.ibaotu.com\/chahua\/wutai"}],"vector":[{"keyword":"\u5987\u5973\u8282","url":"https:\/\/haiwai.ibaotu.com\/vector\/funvjie"},{"keyword":"\u79d1\u6280","url":"https:\/\/haiwai.ibaotu.com\/vector\/keji_30573"},{"keyword":"\u82b1","url":"https:\/\/haiwai.ibaotu.com\/vector\/hua_22815"},{"keyword":"\u91d1\u878d","url":"https:\/\/haiwai.ibaotu.com\/vector\/jinrong_28063"},{"keyword":"\u6625\u5929","url":"https:\/\/haiwai.ibaotu.com\/vector\/chuntian"},{"keyword":"\u6559\u80b2","url":"https:\/\/haiwai.ibaotu.com\/vector\/jiaoyu_27513"},{"keyword":"\u5546\u52a1","url":"https:\/\/haiwai.ibaotu.com\/vector\/shangwu_46470"},{"keyword":"\u84dd\u8272","url":"https:\/\/haiwai.ibaotu.com\/vector\/lanse"},{"keyword":"\u65f6\u5c1a","url":"https:\/\/haiwai.ibaotu.com\/vector\/shishang_48828"},{"keyword":"\u7f8e\u98df","url":"https:\/\/haiwai.ibaotu.com\/vector\/meishi_36558"},{"keyword":"\u5fae\u7b11","url":"https:\/\/haiwai.ibaotu.com\/vector\/weixiao_56112"},{"keyword":"\u624b\u7ed8","url":"https:\/\/haiwai.ibaotu.com\/vector\/shouhui_49957"},{"keyword":"\u690d\u7269","url":"https:\/\/haiwai.ibaotu.com\/vector\/zhiwu_68866"},{"keyword":"\u52a8\u7269","url":"https:\/\/haiwai.ibaotu.com\/vector\/dongwu_12567"},{"keyword":"\u82f1\u96c4","url":"https:\/\/haiwai.ibaotu.com\/vector\/yingxiong"},{"keyword":"\u8fd0\u52a8","url":"https:\/\/haiwai.ibaotu.com\/vector\/yundong_67256"},{"keyword":"\u8f66","url":"https:\/\/haiwai.ibaotu.com\/vector\/che_6891"},{"keyword":"\u98de\u673a","url":"https:\/\/haiwai.ibaotu.com\/vector\/feiji_14427"},{"keyword":"\u6c99\u6ee9","url":"https:\/\/haiwai.ibaotu.com\/vector\/shatan_45825"},{"keyword":"\u852c\u83dc","url":"https:\/\/haiwai.ibaotu.com\/vector\/shucai"},{"keyword":"\u8003\u8bd5","url":"https:\/\/haiwai.ibaotu.com\/vector\/kaoshi"},{"keyword":"\u8001\u5e08","url":"https:\/\/haiwai.ibaotu.com\/vector\/laoshi_33016"},{"keyword":"\u745c\u4f3d","url":"https:\/\/haiwai.ibaotu.com\/vector\/yujia_66262"},{"keyword":"\u5316\u5986\u54c1","url":"https:\/\/haiwai.ibaotu.com\/vector\/huazhuangpin_23315"},{"keyword":"\u4f1a\u8bae","url":"https:\/\/haiwai.ibaotu.com\/vector\/huiyi_24090"},{"keyword":"\u623f\u5730\u4ea7","url":"https:\/\/haiwai.ibaotu.com\/vector\/fangdichan"},{"keyword":"\u80fd\u6e90","url":"https:\/\/haiwai.ibaotu.com\/vector\/nengyuan"},{"keyword":"\u624b\u673a","url":"https:\/\/haiwai.ibaotu.com\/vector\/shouji_50144"},{"keyword":"\u6e29\u6696","url":"https:\/\/haiwai.ibaotu.com\/vector\/wennuan"},{"keyword":"\u53a8\u623f","url":"https:\/\/haiwai.ibaotu.com\/vector\/chufang_8255"},{"keyword":"\u592a\u9633","url":"https:\/\/haiwai.ibaotu.com\/vector\/taiyang_53171"},{"keyword":"\u623f\u5b50","url":"https:\/\/haiwai.ibaotu.com\/vector\/fangzi_14294"},{"keyword":"\u8774\u8776","url":"https:\/\/haiwai.ibaotu.com\/vector\/hudie"},{"keyword":"\u82b1","url":"https:\/\/haiwai.ibaotu.com\/vector\/hua_22815"},{"keyword":"\u8bbe\u8ba1\u5143\u7d20","url":"https:\/\/haiwai.ibaotu.com\/vector\/shejiyuansu"},{"keyword":"\u7ebf\u6761","url":"https:\/\/haiwai.ibaotu.com\/vector\/xiantiao"}],"video":[{"keyword":"\u52a8\u6001\u80cc\u666f","url":"https:\/\/haiwai.ibaotu.com\/videos\/dongtaibeijing"},{"keyword":"AE","url":"https:\/\/haiwai.ibaotu.com\/videos\/AE"},{"keyword":"logo","url":"https:\/\/haiwai.ibaotu.com\/videos\/logo"},{"keyword":"\u5b57\u5e55","url":"https:\/\/haiwai.ibaotu.com\/videos\/zimu_71668"},{"keyword":"\u9999\u6e2f","url":"https:\/\/haiwai.ibaotu.com\/videos\/xianggang"},{"keyword":"\u79d1\u6280","url":"https:\/\/haiwai.ibaotu.com\/videos\/keji_30573"},{"keyword":"\u7167\u7247","url":"https:\/\/haiwai.ibaotu.com\/videos\/zhaopian"},{"keyword":"\u80cc\u666f","url":"https:\/\/haiwai.ibaotu.com\/videos\/beijing_3908"},{"keyword":"\u6570\u636e","url":"https:\/\/haiwai.ibaotu.com\/videos\/shuju_51161"},{"keyword":"\u4f01\u4e1a","url":"https:\/\/haiwai.ibaotu.com\/videos\/qiye_41726"},{"keyword":"\u5730\u56fe","url":"https:\/\/haiwai.ibaotu.com\/videos\/ditu_11329"},{"keyword":"\u5546\u52a1","url":"https:\/\/haiwai.ibaotu.com\/videos\/shangwu_46470"},{"keyword":"\u5e7b\u706f\u7247","url":"https:\/\/haiwai.ibaotu.com\/videos\/huandengpian"},{"keyword":"\u6c34","url":"https:\/\/haiwai.ibaotu.com\/videos\/shui_51582"},{"keyword":"\u513f\u7ae5","url":"https:\/\/haiwai.ibaotu.com\/videos\/ertong_13179"},{"keyword":"\u5149","url":"https:\/\/haiwai.ibaotu.com\/videos\/guang_18585"},{"keyword":"\u4e91","url":"https:\/\/haiwai.ibaotu.com\/videos\/yun_67042"},{"keyword":"\u706b\u7130","url":"https:\/\/haiwai.ibaotu.com\/videos\/huoyan"},{"keyword":"\u65f6\u95f4","url":"https:\/\/haiwai.ibaotu.com\/videos\/shijian_48788"},{"keyword":"\u624b\u673a","url":"https:\/\/haiwai.ibaotu.com\/videos\/shouji_50144"},{"keyword":"\u91d1\u878d","url":"https:\/\/haiwai.ibaotu.com\/videos\/jinrong_28063"},{"keyword":"\u84dd\u8272","url":"https:\/\/haiwai.ibaotu.com\/videos\/lanse"},{"keyword":"\u6559\u80b2","url":"https:\/\/haiwai.ibaotu.com\/videos\/jiaoyu_27513"},{"keyword":"\u5efa\u7b51","url":"https:\/\/haiwai.ibaotu.com\/videos\/jianzhu_26599"},{"keyword":"\u98ce\u666f","url":"https:\/\/haiwai.ibaotu.com\/videos\/fengjing_14944"},{"keyword":"\u751f\u6d3b","url":"https:\/\/haiwai.ibaotu.com\/videos\/shenghuo_47934"},{"keyword":"\u8363\u8a89","url":"https:\/\/haiwai.ibaotu.com\/videos\/rongyu"},{"keyword":"\u5e7f\u544a","url":"https:\/\/haiwai.ibaotu.com\/videos\/guanggao_18720"},{"keyword":"3D","url":"https:\/\/haiwai.ibaotu.com\/videos\/3D"},{"keyword":"\u82b1\u74e3","url":"https:\/\/haiwai.ibaotu.com\/videos\/huaban_22826"},{"keyword":"\u9633\u5149","url":"https:\/\/haiwai.ibaotu.com\/videos\/yangguang_62870"},{"keyword":"\u6570\u5b57","url":"https:\/\/haiwai.ibaotu.com\/videos\/shuzi_51284"},{"keyword":"\u5c71","url":"https:\/\/haiwai.ibaotu.com\/videos\/shan_46012"},{"keyword":"\u68ee\u6797","url":"https:\/\/haiwai.ibaotu.com\/videos\/senlin_45580"},{"keyword":"\u4e66","url":"https:\/\/haiwai.ibaotu.com\/videos\/shu_50748"},{"keyword":"\u7231\u60c5","url":"https:\/\/haiwai.ibaotu.com\/videos\/aiqing_1512"}],"audio":[{"keyword":"\u94a2\u7434","url":"https:\/\/haiwai.ibaotu.com\/audio\/gangqin_16141"},{"keyword":"\u5409\u4ed6","url":"https:\/\/haiwai.ibaotu.com\/audio\/jita_25059"},{"keyword":"\u9707\u64bc","url":"https:\/\/haiwai.ibaotu.com\/audio\/zhenhan"},{"keyword":"\u8212\u7f13","url":"https:\/\/haiwai.ibaotu.com\/audio\/shuhuan"},{"keyword":"\u7535\u5f71","url":"https:\/\/haiwai.ibaotu.com\/audio\/dianying"},{"keyword":"\u7b11\u58f0","url":"https:\/\/haiwai.ibaotu.com\/audio\/\u7b11\u58f0"},{"keyword":"\u63d0\u793a","url":"https:\/\/haiwai.ibaotu.com\/audio\/tishi"},{"keyword":"\u706b\u8f66","url":"https:\/\/haiwai.ibaotu.com\/audio\/huoche_24440"},{"keyword":"\u7206\u70b8","url":"https:\/\/haiwai.ibaotu.com\/audio\/baozha"},{"keyword":"\u95f9\u949f","url":"https:\/\/haiwai.ibaotu.com\/audio\/naozhong"},{"keyword":"\u53e4\u5178","url":"https:\/\/haiwai.ibaotu.com\/audio\/gudian"},{"keyword":"\u8f7b\u5feb","url":"https:\/\/haiwai.ibaotu.com\/audio\/qingkuai"},{"keyword":"\u60b2\u4f24","url":"https:\/\/haiwai.ibaotu.com\/audio\/beishang"},{"keyword":"\u79ef\u6781","url":"https:\/\/haiwai.ibaotu.com\/audio\/jiji"},{"keyword":"\u6447\u6eda","url":"https:\/\/haiwai.ibaotu.com\/audio\/yaogun"},{"keyword":"\u72d7","url":"https:\/\/haiwai.ibaotu.com\/audio\/gou_17719"},{"keyword":"\u8b66\u7b1b","url":"https:\/\/haiwai.ibaotu.com\/audio\/\u8b66\u7b1b"},{"keyword":"\u7535\u8bdd","url":"https:\/\/haiwai.ibaotu.com\/audio\/dianhua_11560"},{"keyword":"\u5f00\u95e8","url":"https:\/\/haiwai.ibaotu.com\/audio\/kaimen"},{"keyword":"\u9e1f","url":"https:\/\/haiwai.ibaotu.com\/audio\/niao_38965"},{"keyword":"\u6d6a\u6f2b","url":"https:\/\/haiwai.ibaotu.com\/audio\/langman"},{"keyword":"\u7535\u5b50","url":"https:\/\/haiwai.ibaotu.com\/audio\/dianzi_11973"},{"keyword":"\u7d27\u5f20","url":"https:\/\/haiwai.ibaotu.com\/audio\/jinzhang"},{"keyword":"\u6050\u6016","url":"https:\/\/haiwai.ibaotu.com\/audio\/kongbu"},{"keyword":"\u5ba3\u4f20","url":"https:\/\/haiwai.ibaotu.com\/audio\/xuanchuan"}]};

        function renderHotKws(resource, page) {
            var $list = $('.sHotKeywords');
            page = parseInt(page);
            page = page > 0 ? page : 1;
            var list = _hotKws[resource];
            if (!list) return ;
            var perPage = _isHome ? 16 : 12;
            var start = (page - 1) * perPage;
            var data;


            if (start + 1 > list.length) {
                page = 1;
                start = 0;
            }

            data = list.slice(start, start + perPage);
            hotKwOptions.currentPage = page;

            $list.empty();
            data.forEach(function (item) {
                var $a = $('<a href="javascript:;"  data-val="'+item['keyword']+'" data-url="'+item['url']+'">'+item['keyword']+'</a>');
                $list.append($a);
            })
        }

        // 输入框聚焦加载热门搜索词
        $('.searchInput').on('focus', function () {
            var resource = $dropdown.find('ul').data('resource');
            hotKwOptions.currentPage = 0;

            renderHotKws(resource, hotKwOptions.currentPage + 1)
        });

        // 热门搜索换一换
        $('.updateHotKeywords').on('click', function (e) {
            e.stopPropagation();
            var resource = $dropdown.find('ul').data('resource');

            renderHotKws(resource, hotKwOptions.currentPage + 1);
        });


        // 热门搜索词选取
        $('.sHotKeywords').on('click', 'a', function (e) {
            e.preventDefault();

            var statsUrl = '/stats/search';
            var resource = $dropdown.find('ul').data('resource');

            var data = {'q': $(this).data('val'), resource: resource};

            $.post(statsUrl, data, function () {});
            location.href= $(this).data('url');
        });

        //下载
        $('.pop_tips_click').on('click',  function (e) {
            $('.pop_tips').show();
        });

        $('.pop_tips_dd').on('click',  function (e) {
            $('.pop_tips').hide();
        });

        //关闭5次限制提示窗
        $('.click—dl-limit').on('click',  function (e) {
            $('.dl-limit').hide();
        });

        // sem用户弹窗
        if (_showSemLogin) {
            _showLogin();
        }

        // 导航宣传视频
        $('.actionShowIntroVideo').on('click', function () {
            var $introVideo = $('#introduceVideo');
            var $video = $introVideo.find('video');
            var src = $video.attr('src');

            if (!src) {
                $video.attr('src',  $video.data('src'));
            };
            $introVideo.find('.introduce-pop').addClass('animated zoomIn'); // 动画
            $introVideo.show();
            $video.get(0).play();
        });
    });

</script>

    <script src="//js.ibaotu.com/common/qrcode/qrcode.js"></script>
    <script>
        var active = 2;
        var isLogin = 1;
        var state = {
            'wxOrderId': 0,

        };

        selectCard(active);

        // 支付协议
        $('.vip-rule').click(function () {
            $('.pay-pop').show();
        });

        if (!isLogin) {
            _showLogin();
        }

        $('.nav-card').click(function () {
            var $this = $(this);
            active = $this.data('id');
            $this.addClass('this-card').siblings().removeClass('this-card');
            $('#type-amount > span').text($this.data('price'));
            renderWxQR();
        });

        function renderWxQR() {
            if (!isLogin) return;
            var price = 999;
            if(active == 2){
            	price = 1999;
            }else if(active == 3){
            	price = 2999;
            }
            $.ajax({
            	url : ctx + "/web/bthw/createQrCode",
            	type : "post",
            	data : {
            		price : price
            	},
            	success : function(res){
            		if(res.success){
            			$('#wxqr > img').remove();
            			$('#zfbqr > img').remove();
                        var qrcode1 = new QRCode('wxqr', {
                            text: res.code1,
                            width: 117,
                            height: 117,
                            colorDark : '#000000',
                            colorLight : '#ffffff',
                            correctLevel : QRCode.CorrectLevel.H
                        });

                         qrcode1.makeCode(res.code1);
                         
                         var qrcode2 = new QRCode('zfbqr', {
                             text: res.code2,
                             width: 117,
                             height: 117,
                             colorDark : '#000000',
                             colorLight : '#ffffff',
                             correctLevel : QRCode.CorrectLevel.H
                         });

                          qrcode2.makeCode(res.code2);
            		}else{
            			
            		}
            	}
            });

        }

        function selectCard(id) {
            var $card = $('a[data-id='+id+']');
            $card.addClass('this-card');
            $('#type-amount > span').text($card.data('price'));
            renderWxQR();
        }

        /**
         * 轮询处理
         * @param  delay
         */
        function startFetching(delay) {
            var orderId = state.wxOrderId;
            if (!orderId) return;
            if (!delay) {
                delay = 3*1000;
            }

            if (state.timer) {
                clearInterval(state.timer);
            }

            state.startAt  = Date.now();
            state.timer = setInterval(function () {
                $.get('/enterprise/payment/isSuccess', {orderId: orderId}, function (res) {
                    // 查询到订单支付成功
                    if (res.status === 200) {
                        clearInterval(state.timer);
                        location.href = res.redirect_url;
                        return;
                    }

                    var time = Date.now();

                    // 如果间隔超过5分钟，则增加轮询间隔
                    if (state.startAt && (time - state.startAt) > 1000*60*5) {
                        clearInterval(state.timer);
                        startFetching(5*1000)
                    }
                });
            }, delay);
        }
    </script>

</body>
</html>